package com.lj.back.manage.scaffold.module.job.utils;

import cn.hutool.core.bean.copier.CopyOptions;
import com.google.common.collect.Maps;

import java.util.HashMap;

/**
 * BeanUtil映射配置工具类
 * @author lv
 * @version 1.0.0
 */
public class CopyOptionsUtil {

    private CopyOptionsUtil(){}

    /**
     * 获取定时任务对象和定时任务日志对象相互转换CopyOptions对象
     * @return
     */
    public static CopyOptions getJobAndJobLogInterconversionCopyOptions(){
        CopyOptions copyOptions = com.lj.back.manage.scaffold.common.util.CopyOptionsUtil.getBaseCopyOptions();
        HashMap<String, String> fieldMapping = Maps.newHashMapWithExpectedSize(1);
        fieldMapping.put("id","jobId");
        copyOptions.setFieldMapping(fieldMapping);
        copyOptions.setIgnoreProperties("remark");
        return copyOptions;
    }

}
